import { uploadFileReq, downloadFileReq } from "@/utils/request";
import { BASE_URL, HR_API, APPID, REDIRECT_URI } from "@/settings";
import request from "@/utils/request";
export function uploadFile(filePath) {
  return uploadFileReq({
    url: `${BASE_URL}/file/api/v1/systemFile/uploadImageOss`,
    filePath: filePath,
    name: "files"
  });
}
export function uploadSiteImg(filePath) {
  return uploadFileReq({
    url: `${BASE_URL}/file/api/v1/site/default/uploadImg`,
    filePath: filePath,
    name: "files"
  });
}
export function downloadFile(url) {
  return downloadFileReq({
    url: url
  });
}
export function uploadImg(filePath) {
  return uploadFileReq({
    url: `${BASE_URL}/file/api/v1/general/uploadImg`,
    filePath: filePath,
    name: "files"
  });
}

export function empInfosAdd(data) {
  return request({
    url: `${BASE_URL}/hr/api/v1/empInfos/saveEmpInfoAndRule`,
    method: "post",
    data
  });
}

export function checkInPeoplesAdd(data) {
  return request({
    url: `${BASE_URL}/hr/api/v1/checkInPeoples`,
    method: "post",
    data
  });
}
export function getByKey(data) {
  return request({
    url: `${BASE_URL}/hr/api/v1/miniProgram/getByKey`,
    method: "get",
    data
  });
}
